<template>
    <div class="main_thr">
        <mem-search-item-sec-top :text="text" :icon="icon"></mem-search-item-sec-top>
        <mem-search-item-thr-item :interList="interList" :name="item.name"></mem-search-item-thr-item>
    </div>
</template>

<script type="text/ecmascript-6">
  import Public from '@/assets/js/public';
  import MemSearchItemSecTop from '@/components/spread/MemSearchItemSecTop.vue';
  import MemSearchItemThrItem from '@/components/spread/MemSearchItemThrItem.vue';
  export default {
    /** kebab-case */
    name: 'mem-search-item-thr',

    data() {
      return {
        text: this.item.name + '的所得积分',
        icon: 'integral2',
        interList: []
      };
    },
    props: {
      item: {
        type: Object,
        required: true
      }
    },
    components: {MemSearchItemSecTop, MemSearchItemThrItem},
    methods: {
      getIcon(icon) {
        return Public.ossImg + icon + '.svg';
      }
    },
    computed: {},
    watch: {
      // 监听具体数据变化，并做相应的处理
    },
    beforeCreate() {
      /** 可以在这加个loading事件，在加载实例时触发 */
      // 这个阶段实例的data、methods是读不到的
    },
    created() {
      this.$Spread.getuserInterOrderList().then(res => {
        this.interList = res;
        console.log(res, 'resresresresresresresresresresresresresresres');
      });
    }
  };
</script>

<style lang="stylus" rel="stylesheet/stylus" scoped>
    @import "../../assets/stylus/main.styl";
    .main_thr {
        width 100%;
        flex-y();
        justify-content flex-start
        padding 0 6vw;
        background #fff;
        box-sizing: border-box;
        align-items stretch;
        border-radius 3vw
    }

    .flex-r
        flex-x()

    .flex-c
        flex-y()

    .center
        flex-center()

    .divider
        divider()

    .space
        space()
</style>
